<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>PHP 5.5.x 中废弃的特性</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="migration55.new-features.html">新的特性</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="migration55.changed-functions.html">变更的函数</a></div>
 <div class="up"><a href="migration55.html">从 PHP 5.4.x 迁移到 PHP 5.5.x</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="migration55.deprecated" class="sect1">
  <h2 class="title">PHP 5.5.x 中废弃的特性</h2>

  <div class="sect2" id="migration55.deprecated.mysql">
   <h3 class="title">废弃 <a href="book.mysql.html" class="link">ext/mysql</a></h3>

   <p class="para">
    <a href="book.mysql.html" class="link">原始的 MySQL 扩展</a> 现在被废弃，当连接到数据库时会产生一个 <strong><code>E_DEPRECATED</code></strong> 错误。可使用 <a href="book.mysqli.html" class="link">MySQLi</a> 或 <a href="ref.pdo-mysql.html" class="link">PDO_MySQL</a> 扩展作为替代。
   </p>
  </div>

  <div class="sect2" id="migration55.deprecated.preg-replace-e">
   <h3 class="title"><span class="function"><a href="function.preg-replace.html" class="function">preg_replace()</a></span> 中的 <em>/e</em> 修饰符</h3>

   <p class="para">
   <span class="function"><a href="function.preg-replace.html" class="function">preg_replace()</a></span> 函数中用到的 <em>/e</em> 修饰符现在被弃用。可以使用 <span class="function"><a href="function.preg-replace-callback.html" class="function">preg_replace_callback()</a></span> 函数来替代。
   </p>
  </div>

  <div class="sect2" id="migration55.deprecated.intl">
   <h3 class="title"><a href="book.intl.html" class="link">intl</a> 中的废弃</h3>

   <p class="para">
    <span class="methodname"><a href="intldateformatter.settimezoneid.html" class="methodname">IntlDateFormatter::setTimeZoneID()</a></span> 和 <span class="function"><a href="intldateformatter.settimezoneid.html" class="function">datefmt_set_timezone_id()</a></span> 现在被废弃。可分别使用 <span class="methodname"><a href="intldateformatter.settimezone.html" class="methodname">IntlDateFormatter::setTimeZone()</a></span> 方法和 <span class="function"><a href="intldateformatter.settimezone.html" class="function">datefmt_set_timezone()</a></span> 函数作为替代。
   </p>
  </div>

  <div class="sect2" id="migration55.deprecated.mcrypt">
   <h3 class="title"><a href="book.mcrypt.html" class="link">mcrypt</a> 中的废弃</h3>

   <p class="simpara">
    下列函数已被废弃：
   </p>

   <ul class="itemizedlist">
    <li class="listitem">
     <span class="simpara">
      <span class="function"><a href="function.mcrypt-cbc.html" class="function">mcrypt_cbc()</a></span>
     </span>
    </li>
    <li class="listitem">
     <span class="simpara">
      <span class="function"><a href="function.mcrypt-cfb.html" class="function">mcrypt_cfb()</a></span>
     </span>
    </li>
    <li class="listitem">
     <span class="simpara">
      <span class="function"><a href="function.mcrypt-ecb.html" class="function">mcrypt_ecb()</a></span>
     </span>
    </li>
    <li class="listitem">
     <span class="simpara">
      <span class="function"><a href="function.mcrypt-ofb.html" class="function">mcrypt_ofb()</a></span>
     </span>
    </li>
   </ul>
  </div>
 </div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="migration55.new-features.html">新的特性</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="migration55.changed-functions.html">变更的函数</a></div>
 <div class="up"><a href="migration55.html">从 PHP 5.4.x 迁移到 PHP 5.5.x</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
